package cn.tedu.eg1.controller;

import cn.tedu.eg1.pojo.dto.AddCarDto;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CarCOntroller {
    @RequestMapping("/v1/car/add")
    @ResponseBody
    public String addCar(String brand, String color ,Double price){
        System.out.println("添加车辆 :" + brand + color + price);
        return "添加车辆成功";
    }

    @RequestMapping("/v1/car/add2")
    @ResponseBody
    public String addCar2(AddCarDto addCarDto){
        System.out.println("添加车辆" + addCarDto);
        return "添加成功";
    }

}
